<template>
	<view class="hui">
		<view class="head">
			<u-navbar :autoBack="true" :safeAreaInsetTop="true" :placeholder="true" bgColor="transparent">
				<view class="u-nav-slot b_flex_c" slot="center">
					<view class="city">商品明细</view>
				</view>
			</u-navbar>
		</view>
		<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据"
			@selection-change="selectionChange">
			<uni-tr>
				<uni-th width="50" align="center">订单编号</uni-th>
				<uni-th width="50" align="center">下单用户</uni-th>
				<uni-th width="50" align="center">店铺或公司名称</uni-th>
				<uni-th width="50" align="center">
					订单金额
				</uni-th>
				<uni-th width="50" align="center">
					支付方式
				</uni-th>
				<uni-th width="50" align="center">
					电话
				</uni-th>
				<uni-th width="50" align="center">
					支付状态
				</uni-th>
				<uni-th width="50" align="center">
					订单状态
				</uni-th>
				<uni-th width="50" align="center">
					下单时间
				</uni-th>
				<uni-th width="50" align="center">
					商品名称
				</uni-th>
				<uni-th width="50" align="center">
					规格
				</uni-th>
				<uni-th width="50" align="center">
					数量
				</uni-th>
				
		
			</uni-tr>
			<uni-tr v-for="(item, index) in list" :key="index">
				<uni-td align="center">{{ item.orders.order_num }}</uni-td>
				<uni-td align="center">{{ item.users.nickname }}</uni-td>
				<uni-td align="center">{{ item.users.shop_name }}</uni-td>
				<uni-td align="center">{{ item.orders.hj }}</uni-td>
				<uni-td align="center">{{ item.pay_type }}</uni-td>
				<uni-td align="center">{{ item.users.mobile}}</uni-td>
				<uni-td align="center">{{ item.pay_status }}</uni-td>
				<uni-td align="center">{{ item.shenhe_status }}</uni-td>
				<uni-td align="center">{{ item.createtime}}</uni-td>
				<uni-td align="center">{{ item.goods_name }}</uni-td>
				<uni-td align="center">{{ item.sku_guige}}</uni-td>
				<uni-td align="center">{{ item.buy_num }}</uni-td>
			</uni-tr>
		</uni-table>
	</view>
</template>

<script>
import { goodsDetail } from '@/require/api';

	export default{
		data(){
			return{
				params:{},
				list:[]
			}
		},
		onLoad(e) {
			console.log();
			if(e.params){
				
				
				this.params=JSON.parse(decodeURIComponent(e.params));
			}
			this.getGoodsDetail();
		},
		methods:{
			async getGoodsDetail() {
				let {
					code,
					data
				} = await goodsDetail(this.params);
				if (code == 1) {
					this.list = data;
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep {
		.u-navbar--fixed {
			background: linear-gradient(to bottom, #B9DDFF, #D7EAF3);
		}
	
		.u-input {
			border: 1rpx solid #eee;
		}
	}
	
	
	.head {
		background: linear-gradient(to bottom, #B9DDFF, #D7EAF3);
	}
	scroll-view ::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
		color: transparent;
	}
</style>